import http from "@/api";
import { PutUserStateParam, UserListParam, UserListReturnType } from "@Tea/model";

const userManageHttp = {
  // 获取职位列表
  userPageList: (params: UserListParam) => http<UserListReturnType[]>({
    method: "post",
    url: "/admin/personnelManage/userManage/userList/userPageList",
    params
  }),
  putUserState: (params: PutUserStateParam) => http({
    method: "put",
    url: "/admin/personnelManage/userManage/userList/putUserState",
    params
  }),
  /**
   * @use 权限升级
   * @param userId 
   * @returns 
   */
  upgradeAuthority: (userId: number) => http({
    method: "put",
    url: "/admin/personnelManage/upgradeAuthority?userId=" + userId,
  })
}

export default userManageHttp